package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the REGOBJMAP database table.
 * 
 */
@Embeddable
public class RegobjmapPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private long regdomid;
	private String regobj;

    public RegobjmapPK() {
    }

	@Column(unique=true, nullable=false)
	public long getRegdomid() {
		return this.regdomid;
	}
	public void setRegdomid(long regdomid) {
		this.regdomid = regdomid;
	}

	@Column(unique=true, nullable=false, length=128)
	public String getRegobj() {
		return this.regobj;
	}
	public void setRegobj(String regobj) {
		this.regobj = regobj;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof RegobjmapPK)) {
			return false;
		}
		RegobjmapPK castOther = (RegobjmapPK)other;
		return 
			(this.regdomid == castOther.regdomid)
			&& this.regobj.equals(castOther.regobj);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.regdomid ^ (this.regdomid >>> 32)));
		hash = hash * prime + this.regobj.hashCode();
		
		return hash;
    }
}